﻿<Window x:Class="AzureDriveUI.OptionsWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Azure Drive Options" Width="720"
		SizeToContent="Height" MinHeight="180"
		Icon="/Azure Drive UI;component/network-drive.ico"
		Loaded="Window_Loaded" WindowStartupLocation="CenterScreen">
	<Window.Resources>
		<Style TargetType="Button">
		</Style>

		<Style TargetType="Label">
			<Setter Property="Margin" Value="0,0,6,6" />
			<Setter Property="Padding" Value="0,0,0,0" />
			<Setter Property="FontSize" Value="9" />
			<Setter Property="FontWeight" Value="Bold" />
			<Setter Property="VerticalAlignment" Value="Center" />
		</Style>

		<Style TargetType="TextBox">
			<Setter Property="Margin" Value="0,0,6,6" />
			<Setter Property="VerticalAlignment" Value="Center" />
		</Style>
	</Window.Resources>

	<Window.Background>
		<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
			<GradientStop Color="AliceBlue" Offset="0" />
			<GradientStop Color="LightSteelBlue" Offset="1" />
		</LinearGradientBrush>
	</Window.Background>

	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition Height="*" />
			<RowDefinition Height="Auto" />
		</Grid.RowDefinitions>

		<StackPanel Grid.Row="0" Margin="6,6,6,6" Orientation="Horizontal" HorizontalAlignment="Right">

			<Button Name="AddButton" Content="Add" IsDefault="True" Width="60" Click="AddButton_Click" />

		</StackPanel>

		<Grid Grid.Row="1" Margin="6,0,0,6">
			<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
				<ItemsControl ItemsSource="{Binding DriveConfigurations}" >
					<ItemsControl.ItemTemplate>
						<DataTemplate>
							<Border Margin="0,0,3,6" BorderThickness="0,0,0,1px"
									SnapsToDevicePixels="True" BorderBrush="#99FFFFFF">
								<Grid>
									<Grid.ColumnDefinitions>
										<ColumnDefinition Width="Auto" />
										<ColumnDefinition Width="Auto" />
										<ColumnDefinition Width="Auto" />
										<ColumnDefinition Width="6" />
										<ColumnDefinition Width="Auto" />
										<ColumnDefinition Width="Auto" />
										<ColumnDefinition Width="6" />
										<ColumnDefinition Width="Auto" />
										<ColumnDefinition Width="*" />
									</Grid.ColumnDefinitions>

									<Button Name="RemoveButton" Content="Remove" Tag="{Binding}" Click="RemoveButton_Click"
										Margin="0,0,6,6" VerticalAlignment="Center" />

									<Label Grid.Column="1" Content="Drive Letter:" />
									<TextBox Grid.Column="2" Text="{Binding DriveLetter}" Width="20" MaxLength="1" />

									<Label Grid.Column="4" Content="Volume Label:" />
									<TextBox Grid.Column="5" Text="{Binding VolumeLabel}" Width="160" MaxLength="32" />

									<Label Grid.Column="7" Content="Connection String:" />
									<TextBox Grid.Column="8" Text="{Binding ConnectionString}" MaxLength="1000" />

								</Grid>
							</Border>
						</DataTemplate>
					</ItemsControl.ItemTemplate>
				</ItemsControl>
			</ScrollViewer>
		</Grid>

		<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right">

			<Button Name="SaveButton" Margin="0,0,6,6" Content="Save" Width="60" Click="SaveButton_Click" />

			<Button Name="CancelButton" Margin="0,0,6,6" Content="Cancel" IsCancel="True" Width="60" Click="CancelButton_Click" />

		</StackPanel>
	</Grid>
</Window>
